#ifndef INCLUDED_API_DEFS
#define INCLUDED_API_DEFS

#define BLPAPI_CORRELATION_TYPE_UNSET   0
#define BLPAPI_CORRELATION_TYPE_INT     1
#define BLPAPI_CORRELATION_TYPE_POINTER 2
#define BLPAPI_CORRELATION_TYPE_AUTOGEN 3
#define BLPAPI_CORRELATION_MAX_CLASS_ID ((1 << 16)-1)

#define BLPAPI_MANAGEDPTR_COPY    1
#define BLPAPI_MANAGEDPTR_DESTROY (-1)


#define BLPAPI_DATETIME_YEAR_PART         0x1
#define BLPAPI_DATETIME_MONTH_PART        0x2
#define BLPAPI_DATETIME_DAY_PART          0x4
#define BLPAPI_DATETIME_OFFSET_PART       0x8
#define BLPAPI_DATETIME_HOURS_PART        0x10
#define BLPAPI_DATETIME_MINUTES_PART      0x20
#define BLPAPI_DATETIME_SECONDS_PART      0x40
#define BLPAPI_DATETIME_MILLISECONDS_PART 0x80
#define BLPAPI_DATETIME_DATE_PART         (BLPAPI_DATETIME_YEAR_PART|   \
                                          BLPAPI_DATETIME_MONTH_PART|  \
                                          BLPAPI_DATETIME_DAY_PART)
#define BLPAPI_DATETIME_TIME_PART         (BLPAPI_DATETIME_HOURS_PART|   \
                                          BLPAPI_DATETIME_MINUTES_PART| \
                                          BLPAPI_DATETIME_SECONDS_PART)
#define BLPAPI_DATETIME_TIMEMILLI_PART    (BLPAPI_DATETIME_TIME_PART|   \
                                          BLPAPI_DATETIME_MILLISECONDS_PART)



#define BLPAPI_EVENTTYPE_ADMIN                 1
#define BLPAPI_EVENTTYPE_SESSION_STATUS        2
#define BLPAPI_EVENTTYPE_SUBSCRIPTION_STATUS   3
#define BLPAPI_EVENTTYPE_REQUEST_STATUS        4
#define BLPAPI_EVENTTYPE_RESPONSE              5
#define BLPAPI_EVENTTYPE_PARTIAL_RESPONSE      6
#define BLPAPI_EVENTTYPE_SUBSCRIPTION_DATA     8  
#define BLPAPI_EVENTTYPE_SERVICE_STATUS        9
#define BLPAPI_EVENTTYPE_TIMEOUT               10
#define BLPAPI_EVENTTYPE_AUTHORIZATION_STATUS  11


#define BLPAPI_ELEMENT_INDEX_END 0xffffffff

#define BLPAPI_STATUS_ACTIVE                0
#define BLPAPI_STATUS_DEPRECATED            1
#define BLPAPI_STATUS_INACTIVE              2
#define BLPAPI_STATUS_PENDING_DEPRECATION   3

#define BLPAPI_SUBSCRIPTIONSTATUS_UNSUBSCRIBED          0
#define BLPAPI_SUBSCRIPTIONSTATUS_SUBSCRIBING           1
#define BLPAPI_SUBSCRIPTIONSTATUS_SUBSCRIBED            2
#define BLPAPI_SUBSCRIPTIONSTATUS_CANCELLED             3
#define BLPAPI_SUBSCRIPTIONSTATUS_PENDING_CANCELLATION  4

#define BLPAPI_CLIENTMODE_AUTO  0
#define BLPAPI_CLIENTMODE_DAPI  1
#define BLPAPI_CLIENTMODE_SAPI  2

#define BLPAPI_ELEMENTDEFINITION_UNBOUNDED  -1

#if defined(_WIN32) || defined(__WIN32__) && \
      ! (defined(cygwin) || defined(__cygwin))
    #ifdef BLPAPI_BUILD
        #define BLPAPI_EXPORT __declspec(dllexport)
    #else
        #define BLPAPI_EXPORT __declspec(dllimport)
    #endif
#else
    #define BLPAPI_EXPORT 
#endif

#endif /* #ifndef INCLUDED_API_DEFS */

